起初接觸Java的時候,正式開始學習寫程式的時候,第一支程式通常是『HelloWorld』,學習過Java的人對這支程式肯定都印象深刻,接下來我會使用這支程式介紹許多Java的小東西!
●[ ]:array ●String:字串陣列●(String[] args):input●args:變數
● The method println() is used to output a string to the screen.
● System.out refers to the standard output device, say the screen.
● Every statement ends with a semicolon (;).
● class: declare a new class followed a distinct class name.
Class取名開頭必須大寫字母! EX:Student,Order,School…
● public: can be accessed by any other class.
● static: can be called without having any object.
● void: do not return a value.
Table of special characters
Bugs
有三種常見的Bugs:
●Compile-time error: most of them are syntax errors. (語法錯誤)
● Runtime error: occurs when Java program runs, e.g. 1/0. (通常用以表示有東西不存在)
● Logic error: introduced by implementing the functional requirement incorrectly.(邏輯錯誤)